package thread;

import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) {
        /*System.out.println("程序开始了");
        try{
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("程序结束了");

         */
        Scanner s=new Scanner(System.in);
        System.out.println("请输入数字：");
        int n=s.nextInt();
        for(int i=n;i>=0;i--){
            System.out.println(i);
            try{
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
